package com.humanmonth.util.effect
{
	import flash.display.DisplayObject;
	
	/**
	 * @author 林子龙
	 */
	public class EffectUtil
	{
		public function EffectUtil()
		{
		}
		
		/**
		 *增加过滤器 
		 */
		public static function addFilter(obj:DisplayObject,filter:Object):void{
			obj.filters = obj.filters.concat(filter);
		}
		
		/**
		 * 
		 * 减去过滤器 
		 */
		public static function minusFilter(obj:DisplayObject,filter:Object):void{
		    var newFilter : Array = obj.filters;
			for(var i : int = 0;i < obj.filters.length;i++) {
				if(obj.filters[i] == filter) {
					newFilter.splice(i, 1);
					obj.filters = newFilter;
					return;
				}
			}
		}

	}
}